home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGNG_C
/
CSTUFF.LZH
/
GETCURS.C
< prev
next >
Wrap
Text File
|
1986-09-23
|
821b
|
47 lines
/* getcursor.c - gets current cursor position */
#include "stdio.h"
#include "dos.h"
union REGS regs;
getcursor(prow, pcol)
int *prow, *pcol;
{
regs.h.ah = 3;
regs.x.bx = 0;
int86(0x10, ®s, ®s);
*prow = regs.h.dh;
*pcol = regs.h.dl;
}
/* DRIVER TO TEST GETCURSOR FUNCTION */
#if defined(DEBUG)
main()
{
int row, col, x, y;
char string[80];
char *input;
cls();
printf("Enter row: \n");
scanf("%d", &y);
printf("Now enter column: \n");
scanf("%d", &x);
cpos(y, x);
getcursor(&row, &col);
printf("\nThe cursor position was row %d and column %d\n",row, col);
printf("End of test\n");
}
#endif /* END OF DRIVER */